package com.pets.springboot_petshop.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @Author: wxk
 * @Email: 2089967794@qq.com
 * @Date: 2024/12/26 下午8:41 周四
 * @Description: 年度盈利
 */
@AllArgsConstructor
@Data
@NoArgsConstructor
public class MonthlyProfit  implements Serializable {
    private int year;
    private int month;
    private String status;
    private double totalAmount;
    private int refundCount;//退货订单数
    private int totalOrderCount;//总订单数

    // 构造函数、Getter和Setter方法、toString方法省略...

    public double getRefundRate() {
        return (double) refundCount / totalOrderCount;
    }
}
